package cc.admin.modules.wea.entity;

import java.io.Serializable;
import java.util.Date;

import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import cc.admin.poi.excel.annotation.Excel;
import cc.admin.common.aspect.annotation.Dict;

/**
 * @Description: 海洋天气情况
 * @Author: cc-admin
 * @Date:   2024-08-30
 * @Version: V1.0.0
 */
@Data
@TableName("wea_sea_conditions")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="wea_sea_conditions对象", description="海洋天气情况")
public class WeaSeaConditions {

	/**编号*/
	@Excel(name = "编号", width = 15)
    @ApiModelProperty(value = "编号")
	private String id;
	/**平台id*/
	@Excel(name = "平台id", width = 15)
    @ApiModelProperty(value = "平台id")
	private String platformId;
	/**平台名称*/
	@Excel(name = "平台id", width = 15)
	@ApiModelProperty(value = "平台id")
	private String platformIdText;
	/**城市名*/
	@Excel(name = "城市名", width = 15)
    @ApiModelProperty(value = "城市名")
	private String cityName;
	/**经度*/
	@Excel(name = "经度", width = 15)
    @ApiModelProperty(value = "经度")
	private String lon;
	/**纬度*/
	@Excel(name = "纬度", width = 15)
    @ApiModelProperty(value = "纬度")
	private String lat;
	/**更新时刻*/
	@Excel(name = "更新时刻", width = 15)
    @ApiModelProperty(value = "更新时刻")
	private Date dateTime;
	/**白天或夜晚*/
	@Excel(name = "白天或夜晚", width = 15)
    @ApiModelProperty(value = "白天或夜晚")
	private String pod;
	/**能见度*/
	@Excel(name = "能见度", width = 15)
    @ApiModelProperty(value = "能见度")
	private Integer visibility;
	/**天气*/
	@Excel(name = "天气", width = 15)
    @ApiModelProperty(value = "天气")
	private String weatherDescription;
	/**天气代码*/
	@Excel(name = "天气代码", width = 15)
    @ApiModelProperty(value = "天气代码")
	private Integer weatherCode;
	/**云层量*/
	@Excel(name = "云层量", width = 15)
    @ApiModelProperty(value = "云层量")
	private Integer clouds;
	/**气压*/
	@Excel(name = "气压", width = 15)
    @ApiModelProperty(value = "气压")
	private Integer pressure;
	/**降雨量*/
	@Excel(name = "降雨量", width = 15)
    @ApiModelProperty(value = "降雨量")
	private Integer precipitation;
	/**降雪量*/
	@Excel(name = "降雪量", width = 15)
    @ApiModelProperty(value = "降雪量")
	private Integer snow;
	/**温度*/
	@Excel(name = "温度", width = 15)
    @ApiModelProperty(value = "温度")
	private Double temperature;
	/**体感温度*/
	@Excel(name = "体感温度", width = 15)
    @ApiModelProperty(value = "体感温度")
	private Double appTemp;
	/**紫外线指数*/
	@Excel(name = "紫外线指数", width = 15)
    @ApiModelProperty(value = "紫外线指数")
	private Double ultravioletRays;
	/**相对湿度*/
	@Excel(name = "相对湿度", width = 15)
    @ApiModelProperty(value = "相对湿度")
	private Integer rHumidity;
	/**风向角度*/
	@Excel(name = "风向角度", width = 15)
    @ApiModelProperty(value = "风向角度")
	private Integer windDirection;
	/**风速*/
	@Excel(name = "风速", width = 15)
    @ApiModelProperty(value = "风速")
	private Double windSpeed;
	/**风向*/
	@Excel(name = "风向", width = 15)
    @ApiModelProperty(value = "风向")
	private String windMark;
	/**公司id*/
	@Excel(name = "公司id", width = 15)
    @ApiModelProperty(value = "公司id")
	private String tenantId;

	public WeaSeaConditions() {}
	public WeaSeaConditions(JSONObject jsonData) {
		this.id = jsonData.getString("id");
		this.platformId = jsonData.getString("platformId");
		this.platformIdText = jsonData.getString("platformIdText");
		this.cityName = jsonData.getString("cityName");
		this.lon = jsonData.getString("lon");
		this.lat = jsonData.getString("lat");
		this.dateTime = jsonData.getDate("dateTime");
		this.pod = jsonData.getString("pod");
		this.visibility = jsonData.getInteger("visibility");
		this.weatherDescription = jsonData.getString("weatherDescription");
		this.weatherCode = jsonData.getInteger("weatherCode");
		this.clouds = jsonData.getInteger("clouds");
		this.pressure = jsonData.getInteger("pressure");
		this.precipitation = jsonData.getInteger("precipitation");
		this.snow = jsonData.getInteger("snow");
		this.temperature = jsonData.getDouble("temperature");
		this.appTemp = jsonData.getDouble("appTemp");
		this.ultravioletRays = jsonData.getDouble("ultravioletRays");
		this.rHumidity = jsonData.getInteger("rHumidity");
		this.windDirection = jsonData.getInteger("windDirection");
		this.windSpeed = jsonData.getDouble("windSpeed");
		this.windMark = jsonData.getString("windMark");
	}
}
